<?php
/* @var $this SlideController */
/* @var $data Slide */
$baseUrl = Yii::app()->request->baseUrl;
$link = $data->link;
if($link=="")
    $link = "#";
    elseif ($link != "#" && substr_compare($link, 'http', 0) < 0)
        $link = $baseUrl.'/'.$link ; 
?>

<div class="view">
    <table border="0">
        <tbody>
            <tr height="1em">
                <td width="100"><?php echo CHtml::encode($data->getAttributeLabel('id')); ?>:</b>
                <td width="400"><?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id'=>$data->id)); ?></td>
                <td rowspan="5"><?php echo CHtml::link(CHtml::image($baseUrl.'/protected/uploads/images/slides/'.$data->image,$data->image,array('class'=>'span-7')), array('view', 'id'=>$data->id)); ?></td>
            </tr>
            <tr height="1em">
                <td ><?php echo CHtml::encode($data->getAttributeLabel('title')); ?>:</td>
                <td><?php echo CHtml::encode($data->title); ?></td>
	<br />
            </tr>
            <tr height="1em">
                <td><?php echo CHtml::encode($data->getAttributeLabel('link')); ?>:</td>
                <td><?php echo CHtml::link($data->link,$link); ?></td>
            </tr>
            <tr height="1em">
                <td><?php echo CHtml::encode($data->getAttributeLabel('position')); ?>:</td>
                <td><?php echo CHtml::encode($data->position); ?></td>
            </tr>
            <tr>
                <td><?php echo CHtml::encode($data->getAttributeLabel('description')); ?>:</td>
                <td><?php echo CHtml::encode($data->description); ?></td>
            </tr>
        </tbody>
    </table>
</div>